﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Ewk.Runtime.Serialization.PositionBased
{
    [Flags]
    public enum DatarecordLengthCriterium
    {
        /// <summary>
        /// The length criterium is not defined.
        /// </summary>
        None = 0,

        /// <summary>
        /// The criterium for datarecords that need to have a length equal
        /// to the length in the definition of the datarecord.
        /// </summary>
        EqualsDefinition = 1,

        /// <summary>
        /// The criterium for datarecords that need to have a length greater
        /// than the length in the definition of the datarecord.
        /// </summary>
        GreaterThanDefinition = 2,

        /// <summary>
        /// The criterium for datarecords that need to have a length greater or equal
        /// to the length in the definition of the datarecord.
        /// </summary>
        GreaterOrEqualToDefinition = EqualsDefinition | GreaterThanDefinition,

        /// <summary>
        /// The criterium for datarecords that need to have a length smaller
        /// than the length in the definition of the datarecord.
        /// </summary>
        SmallerThanDefinition = 4,

        /// <summary>
        /// The criterium for datarecords that need to have a length smaller or equal
        /// to the length in the definition of the datarecord.
        /// </summary>
        SmallerOrEqualToDefinition = EqualsDefinition | SmallerThanDefinition,

        /// <summary>
        /// The criterium for datarecords that can have any length.
        /// </summary>
        All = EqualsDefinition | GreaterThanDefinition | SmallerThanDefinition,
    }
}
